package com.igeek.service;

import com.igeek.dao.ProductDao;
import com.igeek.entity.Product;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProductService {

    @Resource
    private ProductDao productDao;

    public List<Product> findAll(){
        return productDao.findAll();
    }

    public Product findById(Integer proId){
        return productDao.findById(proId);
    }

    public List<Product> findByTypeId(Integer typeId){
        return productDao.findByTypeId(typeId);
    }

    public List<Product> findByOption(String brand, String location){
        return productDao.findByOption(brand, location);
    }
}
